package com.app.factories.impl;

import com.app.factories.BetFactory;
import com.app.game.bet.Bet;
import com.app.game.bet.numeric.BetCorner;
import com.app.game.bet.numeric.BetSixLine;
import com.app.game.bet.numeric.BetSplit;
import com.app.game.bet.numeric.BetStraight;
import com.app.game.bet.numeric.BetStreet;
import com.app.game.other.Credit;

public class InsideBetFactory implements BetFactory {

	private static final int STRAIGHT = 0,SPLIT_HORIZONTAL = 1,SPLIT_VERTICAL = 2,STREET = 3,CORNER = 4,SIX_LINE = 5;
	private int initialnumber;
	
	public int getInitialnumber() {
		return initialnumber;
	}

	public void setInitialnumber(int initialnumber) {
		this.initialnumber = initialnumber;
	}

	@Override
	public Bet createBet(int type, Credit credit) {
		Bet bet = null;
		switch(type){
		case STRAIGHT: bet = new BetStraight(initialnumber);break; 
		case SPLIT_HORIZONTAL: bet = new BetSplit(BetSplit.Type.HORIZONTAL, initialnumber);break;
		case SPLIT_VERTICAL: bet = new BetSplit(BetSplit.Type.VERTICAL, initialnumber);break;
		case STREET: bet = new BetStreet(initialnumber);break;
		case CORNER: bet = new BetCorner(initialnumber);break;
		case SIX_LINE: bet = new BetSixLine(initialnumber);break;
		}
		bet.setCredit(credit);
		return bet;
	}


}
